#include <iostream>
#include <string>
// 包含SpireMS SDK头文件
#include <sms_core.h>


int main(int argc, char *argv[])
{
    sms::Publisher pub("/topic/pose", "geometry_msgs::Pose");
    
    while (1)
    {
        nlohmann::json msg = sms::def_msg("geometry_msgs::Pose");
        msg["position"]["x"] = 10.0;
        msg["position"]["y"] = 2.0;
        msg["position"]["z"] = 5.5;
        msg["orientation"]["x"] = 3.0;
        msg["orientation"]["y"] = 2.0;
        msg["orientation"]["z"] = 4.0;
        msg["orientation"]["w"] = 1.0;
        pub.publish(msg);
        sms::msleep(1000);
    }

    pub.join();
    return 0;
}

